# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Compute.V1.Model.NodeGroupNode do
  @moduledoc """


  ## Attributes

  *   `accelerators` (*type:* `list(GoogleApi.Compute.V1.Model.AcceleratorConfig.t)`, *default:* `nil`) - Accelerators for this node.
  *   `consumedResources` (*type:* `GoogleApi.Compute.V1.Model.InstanceConsumptionInfo.t`, *default:* `nil`) - Node resources that are reserved by all instances.
  *   `cpuOvercommitType` (*type:* `String.t`, *default:* `nil`) - CPU overcommit.
  *   `disks` (*type:* `list(GoogleApi.Compute.V1.Model.LocalDisk.t)`, *default:* `nil`) - Local disk configurations.
  *   `instanceConsumptionData` (*type:* `list(GoogleApi.Compute.V1.Model.InstanceConsumptionData.t)`, *default:* `nil`) - Instance data that shows consumed resources on the node.
  *   `instances` (*type:* `list(String.t)`, *default:* `nil`) - Instances scheduled on this node.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The name of the node.
  *   `nodeType` (*type:* `String.t`, *default:* `nil`) - The type of this node.
  *   `satisfiesPzs` (*type:* `boolean()`, *default:* `nil`) - [Output Only] Reserved for future use.
  *   `serverBinding` (*type:* `GoogleApi.Compute.V1.Model.ServerBinding.t`, *default:* `nil`) - Binding properties for the physical server.
  *   `serverId` (*type:* `String.t`, *default:* `nil`) - Server ID associated with this node.
  *   `status` (*type:* `String.t`, *default:* `nil`) - 
  *   `totalResources` (*type:* `GoogleApi.Compute.V1.Model.InstanceConsumptionInfo.t`, *default:* `nil`) - Total amount of available resources on the node.
  *   `upcomingMaintenance` (*type:* `GoogleApi.Compute.V1.Model.UpcomingMaintenance.t`, *default:* `nil`) - [Output Only] The information about an upcoming maintenance event.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :accelerators => list(GoogleApi.Compute.V1.Model.AcceleratorConfig.t()) | nil,
          :consumedResources => GoogleApi.Compute.V1.Model.InstanceConsumptionInfo.t() | nil,
          :cpuOvercommitType => String.t() | nil,
          :disks => list(GoogleApi.Compute.V1.Model.LocalDisk.t()) | nil,
          :instanceConsumptionData =>
            list(GoogleApi.Compute.V1.Model.InstanceConsumptionData.t()) | nil,
          :instances => list(String.t()) | nil,
          :name => String.t() | nil,
          :nodeType => String.t() | nil,
          :satisfiesPzs => boolean() | nil,
          :serverBinding => GoogleApi.Compute.V1.Model.ServerBinding.t() | nil,
          :serverId => String.t() | nil,
          :status => String.t() | nil,
          :totalResources => GoogleApi.Compute.V1.Model.InstanceConsumptionInfo.t() | nil,
          :upcomingMaintenance => GoogleApi.Compute.V1.Model.UpcomingMaintenance.t() | nil
        }

  field(:accelerators, as: GoogleApi.Compute.V1.Model.AcceleratorConfig, type: :list)
  field(:consumedResources, as: GoogleApi.Compute.V1.Model.InstanceConsumptionInfo)
  field(:cpuOvercommitType)
  field(:disks, as: GoogleApi.Compute.V1.Model.LocalDisk, type: :list)

  field(:instanceConsumptionData,
    as: GoogleApi.Compute.V1.Model.InstanceConsumptionData,
    type: :list
  )

  field(:instances, type: :list)
  field(:name)
  field(:nodeType)
  field(:satisfiesPzs)
  field(:serverBinding, as: GoogleApi.Compute.V1.Model.ServerBinding)
  field(:serverId)
  field(:status)
  field(:totalResources, as: GoogleApi.Compute.V1.Model.InstanceConsumptionInfo)
  field(:upcomingMaintenance, as: GoogleApi.Compute.V1.Model.UpcomingMaintenance)
end

defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.NodeGroupNode do
  def decode(value, options) do
    GoogleApi.Compute.V1.Model.NodeGroupNode.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.NodeGroupNode do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
